package info.graph;

import org.neo4j.graphdb.GraphDatabaseService;


public class GraphData {
	private static String description, normalized_description;
	private static String from_normalized_description, end_normalized_description;
	private static int time, frequency_time, frequency_terms,joint_frequency;
	private static double correlation_strength, association_strength;
		
	public void setData(GraphDatabaseService db){

		/*include 10 banco_dados
		 * 5 - 2013
		 * 4 - 2012
		 * 3 - 2011
		 * 2 - 2010
		 */
		description = "Banco de Dados";
		normalized_description =  "banco_dados";
		
		time =-1; //all years
		frequency_time = 14;
		
		GraphStruct.include_word(db,description,normalized_description,time,frequency_time);

		time =2013; //this year
		frequency_time = 5;		
		GraphStruct.include_word(db,description,normalized_description,time,frequency_time);

		time =2012; //this year
		frequency_time = 4;		
		GraphStruct.include_word(db,description,normalized_description,time,frequency_time);

		time =2011; //this year
		frequency_time = 3;		
		GraphStruct.include_word(db,description,normalized_description,time,frequency_time);

		time =2010; //this year
		frequency_time = 2;		
		GraphStruct.include_word(db,description,normalized_description,time,frequency_time);


		/*include 140 UFSC
		 * 50 - 2013
		 * 40 - 2012
		 * 30 - 2011
		 * 20 - 2010
		 */
		description = "UFSC";
		normalized_description =  "ufsc";
		
		time =-1; //all years
		frequency_time = 140;
		
		GraphStruct.include_word(db,description,normalized_description,time,frequency_time);

		time =2013; //this year
		frequency_time = 50;		
		GraphStruct.include_word(db,description,normalized_description,time,frequency_time);

		time =2012; //this year
		frequency_time = 40;		
		GraphStruct.include_word(db,description,normalized_description,time,frequency_time);

		time =2011; //this year
		frequency_time = 30;		
		GraphStruct.include_word(db,description,normalized_description,time,frequency_time);

		time =2010; //this year
		frequency_time = 20;		
		GraphStruct.include_word(db,description,normalized_description,time,frequency_time);
/*
		time =2010; //this year
		frequency_time = 10;		
		GraphStruct.include_word(db,description,normalized_description,time,frequency_time);
*/
		
		/*include 140 UFSC
		 * 50 - 2013
		 * 40 - 2012
		 * 30 - 2011
		 * 20 - 2010
		 */
		description = "UDESC";
		normalized_description =  "udesc";
		
		time =-1; //all years
		frequency_time = 100;
		
		GraphStruct.include_word(db,description,normalized_description,time,frequency_time);

		time =2013; //this year
		frequency_time = 40;		
		GraphStruct.include_word(db,description,normalized_description,time,frequency_time);

		time =2012; //this year
		frequency_time = 30;		
		GraphStruct.include_word(db,description,normalized_description,time,frequency_time);

		time =2011; //this year
		frequency_time = 20;		
		GraphStruct.include_word(db,description,normalized_description,time,frequency_time);

		time =2010; //this year
		frequency_time = 10;		
		GraphStruct.include_word(db,description,normalized_description,time,frequency_time);

		
		/*relation between two nodes*/
		from_normalized_description = "banco_dados";
		end_normalized_description = "ufsc";
		
		
		time =2013;
		correlation_strength = 0.0;
		association_strength = 0.0;
		joint_frequency = 3;
		
		GraphStruct.relate_words(db,from_normalized_description,end_normalized_description,time,correlation_strength, 
									association_strength, joint_frequency);
		
		time =2012;
		correlation_strength = 0.0;
		association_strength = 0.0;
		joint_frequency = 2;
		
		GraphStruct.relate_words(db,from_normalized_description,end_normalized_description,time,correlation_strength, 
									association_strength, joint_frequency);
		
		time =2011;
		correlation_strength = 0.0;
		association_strength = 0.0;
		joint_frequency = 1;
		
		GraphStruct.relate_words(db,from_normalized_description,end_normalized_description,time,correlation_strength, 
									association_strength, joint_frequency);
	
		/*relation between two nodes*/
		from_normalized_description = "banco_dados";
		end_normalized_description = "udesc";
		
		
		time =2013;
		correlation_strength = 0.0;
		association_strength = 0.0;
		joint_frequency = 2;
		
		GraphStruct.relate_words(db,from_normalized_description,end_normalized_description,time,correlation_strength, 
									association_strength, joint_frequency);
		
		time =2012;
		correlation_strength = 0.0;
		association_strength = 0.0;
		joint_frequency = 2;
		
		GraphStruct.relate_words(db,from_normalized_description,end_normalized_description,time,correlation_strength, 
									association_strength, joint_frequency);
		
		time =2011;
		correlation_strength = 0.0;
		association_strength = 0.0;
		joint_frequency = 2;
		
		GraphStruct.relate_words(db,from_normalized_description,end_normalized_description,time,correlation_strength, 
									association_strength, joint_frequency);
	
		time =2010;
		correlation_strength = 0.0;
		association_strength = 0.0;
		joint_frequency = 1;
		
		GraphStruct.relate_words(db,from_normalized_description,end_normalized_description,time,correlation_strength, 
									association_strength, joint_frequency);
		
		time =-1;
		correlation_strength = 0.0;
		association_strength = 0.0;
		joint_frequency = 7;
		
		GraphStruct.relate_words(db,from_normalized_description,end_normalized_description,time,correlation_strength, 
									association_strength, joint_frequency);
		
		from_normalized_description = "ufsc";
		end_normalized_description = "udesc";
		
		
		time =2013;
		correlation_strength = 0.0;
		association_strength = 0.0;
		joint_frequency = 20;
		
		GraphStruct.relate_words(db,from_normalized_description,end_normalized_description,time,correlation_strength, 
									association_strength, joint_frequency);
		
		time =2012;
		correlation_strength = 0.0;
		association_strength = 0.0;
		joint_frequency = 15;
		
		GraphStruct.relate_words(db,from_normalized_description,end_normalized_description,time,correlation_strength, 
									association_strength, joint_frequency);
		
		time =2011;
		correlation_strength = 0.0;
		association_strength = 0.0;
		joint_frequency = 10;
		
		GraphStruct.relate_words(db,from_normalized_description,end_normalized_description,time,correlation_strength, 
									association_strength, joint_frequency);
	
		time =2010;
		correlation_strength = 0.0;
		association_strength = 0.0;
		joint_frequency = 5;
		
		GraphStruct.relate_words(db,from_normalized_description,end_normalized_description,time,correlation_strength, 
									association_strength, joint_frequency);
		
		time =-1;
		correlation_strength = 0.0;
		association_strength = 0.0;
		joint_frequency = 50;
		
		GraphStruct.relate_words(db,from_normalized_description,end_normalized_description,time,correlation_strength, 
				association_strength, joint_frequency);
		GraphStruct.relate_words(db,end_normalized_description,from_normalized_description,time,correlation_strength, 
				association_strength, joint_frequency);

	}
}
